<!doctype html>
<html>
{include file="layout/header" /}
<body class="bg-primary">
<div id="app">
    <section class="section">
        <div class="container mt-5">
            <div class="page-error">
                <div class="page-inner">
                    <?php switch ($code) {?>
                    <?php case 1:?>

                    <h1>:)</h1>
                    <!--<p>操作成功，您可以点击跳转或等待自动跳转！</p>-->
                    <?php break;?>
                    <?php case 0:?>
                    <h1>:(</h1>
                    <!--<p>您的请求出现异常，您可以点击跳转或等待自动跳转！</p>-->
                    <?php break;?>
                    <?php } ?>
                    <div class="page-description">
                        <?php echo(strip_tags($msg));?>
                    </div>
                    <div class="page-search">
                        <div class="mt-3">
                            <a href="<?php echo($url);?>" class="btn btn-success" id="href" target="_self">跳转等待<b id="wait"><?php echo($wait);?></b></a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="simple-footer mt-5 text-white">
                Copyright &copy; XY-Admin by Ray Technologies 2019
            </div>
        </div>
    </section>
</div>

{include file="layout/footer" /}
<script type="text/javascript">
  (function(){
    var wait = document.getElementById('wait'),
      href = document.getElementById('href').href;
    var interval = setInterval(function(){
      var time = --wait.innerHTML;
      if(time <= 0) {
        location.href = href;
        clearInterval(interval);
      };
    }, 1000);
  })();
</script>
</body>
</html>